package nl.hu.verbrandendephoenix.view;

import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;

public class BlockUser extends VerticalPanel {

	private Label lblQuestion, lblUsername;
	private Button btnYes, btnNo;
	
	public BlockUser(String username, nl.hu.verbrandendephoenix.controller.BlockUser controller) {
		lblUsername = new Label(username);
		lblQuestion = new Label("Weet u zeker dat u: " + lblUsername.getText() + " wilt blokkeren?");
		btnYes = new Button("Blokkeer");
		btnYes.addClickHandler(controller.hndYes());
		btnNo = new Button("Annuleren");
		btnNo.addClickHandler(controller.hndCancel());
		
		this.add(lblQuestion);
		HorizontalPanel pnlButtons = new HorizontalPanel();
		pnlButtons.setSpacing(5);
		pnlButtons.add(btnYes);
		pnlButtons.add(btnNo);
		this.add(pnlButtons);
	}
}
